import type { IRoute } from 'umi';

const routes: IRoute[] = [
  { path: '/login', component: '@/pages/Login' },
  {
    path: '/home',
    component: '@/pages/Home',
    exact: false,
    wrappers: ['@/wrappers'],
    routes: [
      {
        path: '/',
        component: '@/layouts',
        routes: [
          { path: '/home', component: '@/pages/Routine', exact: true },
          // 图表放大版
          { path: '/home/bkh', component: '@/pages/Echars/BigKh' },
          { path: '/home/collecting', component: '@/pages/Echars/BigLy' },
          { path: '/home/jzpg', component: '@/pages/Echars/BigJz' },
          { path: '/home/khfl', component: '@/pages/Echars/BigKhFl' },
          {
            path: '/home/echars',
            component: '@/pages/SalesPortal/index',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/system/adduser',
            component: '@/pages/Home/system/userCtrl/adduser',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/system/userlist',
            component: '@/pages/Home/system/userCtrl/userlist',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/system/upPassword',
            component: '@/pages/Home/system/userCtrl/upPassword',
            exact: true,
            wrappers: ['@/wrappers'],
          },

          {
            path: '/home/system/addRole',
            component: '@/pages/Home/system/roleSet/addRole',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/system/authSet',
            component: '@/pages/Home/system/roleSet/authSet',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/system/roleList',
            component: '@/pages/Home/system/roleSet/roleList',
            exact: true,
            wrappers: ['@/wrappers'],
          },

          {
            path: '/home/system/SetOrg',
            component: '@/pages/Home/system/Org/SetOrg',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/system/orgMap',
            component: '@/pages/Home/system/Org/orgMap',
            exact: true,
            wrappers: ['@/wrappers'],
          },

          {
            path: '/home/system/Setparent',
            component: '@/pages/Home/system/Org/Setparent',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          // {
          //   path: '/home/system/roleList',
          //   component: '@/pages/system/roleSet/roleList',
          //   exact: true,
          //   wrappers: ['@/wrappers'],
          // },
          {
            path: '/home/system/shengfen',
            component: '@/pages/Home/system/base/shengfen',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/system/category',
            component: '@/pages/Home/system/base/Category',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/system/attribute',
            component: '@/pages/Home/system/base/Attr',
            exact: true,
            wrappers: ['@/wrappers'],
          },

          // 通知模块路由
          {
            path: '/home/notice/news',
            component: '@/pages/Home/Notice/News',
          },
          // 库存管理
          {
            path: '/home/stock',
            component: '@/pages/Home/stock/index',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          // 新增库存管理
          {
            path: '/home/stock/addput',
            component: '@/pages/Home/stock/addput',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          // 待入库列表
          {
            path: '/home/stock/waitlist',
            component: '@/pages/Home/stock/Waitlist',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/sale',
            component: '@/pages/Home/sale/index',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/sale/adduser',
            component: '@/pages/view/AddUser.jsx',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/sale/divide',
            component: '@/pages/view/Divide.jsx',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/intelligence/navAd',
            component: '@/pages/Home/Intelligence/three',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          //行政>>>员工去向
          {
            path: '/home/administration/employeedestination',
            component: '@/pages/Home/Administration/EmployeeDestination',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          //行政>>>我的去向
          {
            path: '/home/administration/mydestination',
            component: '@/pages/Home/Administration/MyDestination',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          //生产管理
          {
            path: '/home/production',
            component: '@/pages/Home/production/index',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          // 财务管理>>>新增物料清单
          {
            path: '/home/production/addMatter',
            component: '@/pages/Home/production/AddMatter',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          // 财务管理>>>物料清单列表
          {
            path: '/home//production/list',
            component: '@/pages/Home/production/proList',
            exact: true,
            wrappers: ['@/wrappers'],
          },

          // 财务管理
          {
            path: '/home/finance',
            component: '@/pages/Home/Finance/index',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          // 财务管理>>>预收款列表
          {
            path: '/home/finance/collection',
            component: '@/pages/Home/Finance/Collection',
            exact: true,
          },
          // 财务管理>>>预收款列表>>>新增
          {
            path: '/home/finance/collection/add',
            component: '@/pages/Home/Finance/Collection/Add',
            exact: true,
          },
          // 财务管理>>>预收款列表>>>修改
          {
            path: '/home/finance/collection/edit',
            component: '@/pages/Home/Finance/Collection/Edit',
            exact: true,
          },
          // 财务管理>>>期初应收列表
          {
            path: '/home/finance/receivables',
            component: '@/pages/Home/Finance/Receivables',
            exact: true,
          },
          // 资料模块路由路由
          {
            path: '/home/data/mydata',
            component: '@/pages/Home/Data/MyData',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/data/datacenter',
            component: '@/pages/Home/Data/DataCenter',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/data/datatype',
            component: '@/pages/Home/Data/DataType',
          },
          {
            path: '/home/initiate/task',
            component: '@/pages/Home/Task/initiatetask',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/initiate/mytask',
            component: '@/pages/Home/Task/mytask',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/person/report',
            component: '@/pages/Home/person/report',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/person/backlog',
            component: '@/pages/Home/person/backlog',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/initiate/backlog',
            component: '@/pages/Home/Task/agency',

            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/person/done',
            component: '@/pages/Home/person/done',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/person/leave',
            component: '@/pages/Home/person/leave',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/person/destroy',
            component: '@/pages/Home/person/destroy',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/person/exam',
            component: '@/pages/Home/person/exam',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/person/come',
            component: '@/pages/Home/person/come',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/person/overtime',
            component: '@/pages/Home/person/overtime',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/initiate/accomplish',
            component: '@/pages/Home/Task/done',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/initiate/rank',
            component: '@/pages/Home/Task/jibie',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/initiate/monitoring',
            component: '@/pages/Home/Task/jianting',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/initiate/notify',
            component: '@/pages/Home/Task/zhihui',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/taskxiangxi',
            component: '@/pages/Home/Task/xiangxi',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/flow/sponsor',
            component: '@/pages/Home/flow/sponsor',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/flow/backlog',
            component: '@/pages/Home/flow/backlog',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/flow/accomplish',
            component: '@/pages/Home/flow/accomplish',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/flow/proposer',
            component: '@/pages/Home/flow/proposer',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/flow/journey',
            component: '@/pages/Home/flow/journey',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/flow/monitoring',
            component: '@/pages/Home/flow/monitoring',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          // {
          //   path: '/home/flow/unread',
          //   component: '@/pages/Home/flow/unread',
          //   exact: true,
          //   wrappers: ['@/wrappers'],
          // },
          // 通知模块路由
          {
            path: '/home/notice/administration',
            component: '@/pages/Home/Notice/natice_type',
          },
          {
            path: '/home/news',
            component: '@/pages/Home/New',
          },
          // 人事,
          {
            path: '/home/MyMessage',
            component: '@/pages/Home/MyMessage',
          },
          // 新增人员档案
          {
            path: '/home/newaddryda',
            component: '@/pages/Home/MyMessage/newaddryda',
          },
          // 计划// 计划
          // 日计划
          {
            path: '/home/plan/dailyplan',
            component: '@/pages/Home/Plan/workDayPlan',
          },
          // 周计划
          {
            path: '/home/plan/weeklyplan',
            component: '@/pages/Home/Plan/workWeekPlan',
          },
          // 月计划
          {
            path: '/home/plan/monthlyplan',
            component: '@/pages/Home/Plan/workMoonPlan',
          },
          // 季计划
          {
            path: '/home/plan/seasonplan',
            component: '@/pages/Home/Plan/workSeasonPlan',
          },
          // 半年计划
          {
            path: '/home/plan/halfyearplan',
            component: '@/pages/Home/Plan/halfYearPlan',
          },
          // 年计划
          {
            path: '/home/plan/yearplan',
            component: '@/pages/Home/Plan/workYearPlan',
          },
          // 添加计划
          // {
          //   path: '/home/plan/addplan',
          //   component: '@/pages/Home/plan/Addplan',

          // },
          // 直接下属计划
          {
            path: '/home/plan/directsubordinateplay',
            component: '@/pages/Home/Plan/directSubordinate',
          },
          // 所有下属计划
          {
            path: '/home/plan/allsubordinateplan',
            component: '@/pages/Home/Plan/allSubordinate',
          },
          // 所有工作计划
          {
            path: '/home/plan/allplan',
            component: '@/pages/Home/Plan/allWorkPlan',
          },
          // 计划设置
          // 计划状态
          {
            path: '/home/plan/stateplan',
            component: '@/pages/Home/Plan/PlanSetting/planState',
          },
          // 计划类型
          {
            path: '/home/plan/typeplan',
            component: '@/pages/Home/Plan/PlanSetting/planType',
          },

          //报告模块
          {
            path: '/home/report/daily',
            component: '@/pages/Home/Report/daily',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/report/weekly',
            component: '@/pages/Home/Report/weekly',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/report/monthly',
            component: '@/pages/Home/Report/monthly',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/report/semester',
            component: '@/pages/Home/Report/semester',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/report/annual',
            component: '@/pages/Home/Report/annual',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/report/subordinate',
            component: '@/pages/Home/Report/subordinate',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/report/subordinateAll',
            component: '@/pages/Home/Report/subordinateAll',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/report/allReport',
            component: '@/pages/Home/Report/allReport',
            exact: true,
            wrappers: ['@/wrappers'],
          },

          {
            path: '/home/notice/classify',
            component: '@/pages/Home/Notice/addtype',
          },
          {
            path: '/home/purchase',
            component: '@/pages/Home/Purchase',
          },
          {
            path: '/home/purchase/addsup',
            component: '@/pages/Home/Purchase/addsupplier',
          },
          {
            path: '/home/suplist',
            component: '@/pages/Home/Purchase/supplierList',
          },
          // /system/upPassword
          // 人事档案
          {
            path: '/home/mymessage',
            component: '@/pages/Home/MyMessage',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          { component: '@/pages/Cuowu.js' }, //如果路由不正确就跳404
        ],
      },
    ],
  },
  { path: '/', redirect: '/login' },
];

export default routes;
